class Seiso::ImportMaster
  # Maps a SDM IP address role to a Seiso IP address role.
  #
  # Author:: Willie Wheeler
  # Copyright:: Copyright (c) 2014-2016 Expedia, Inc.
  # License:: Apache 2.0
  class Mappers::ServiceInstancePortMapper

    def map(doc_sip, context)
      si_uri = context['serviceInstance'].href
      {
        'serviceInstance' => si_uri,
        'number' => doc_sip['number'],
        'protocol' => doc_sip['protocol'],
        'description' => doc_sip['description']
      }
    end
  end
end
